﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Citi.PTSConsolidation.Domain
{
    public class TimeBooking
    {
        #region Mappings

        public static readonly Dictionary<string, string> ExcelColumnMappings = new Dictionary<string, string> { 
                {"[Year]", "[Year]"},
                {"[Month Name]", "[MonthName]"},
                {"[Month]", "[Month]"},
                {"[Resource SOE]", "[ResourceSoeid]"},
                {"[Resource Name]", "[ResourceName]"},
                {"[Resource Type]", "[ResourceType]"},
                {"[Res Manager Name]", "[ResourceManagerName]"},
                {"[Project/Non-Project]", "[ProjectNonProject]"},
                {"[Project Id]", "[ProjectId]"},
                {"[Project Manager]", "[ProjectManager]"},
                {"[System GOC Code]", "[SystemGOCCode]"},
                {"[System Man Geo Tree Node]", "[SystemManGeoTreeNode]"},
                {"[System MS Node Name3]", "[SystemMSNodeName3]"},
                {"[System MS Node Name4]", "[SystemMSNodeName4]"},
                {"[System MS Node Name5]", "[SystemMSNodeName5]"},
                {"[System MS Node Name6]", "[SystemMSNodeName6]"},
                {"[System MS Node Name7]", "[SystemMSNodeName7]"},
                {"[System MS Node Name8]", "[SystemMSNodeName8]"},
                {"[System MS Node Name9]", "[SystemMSNodeName9]"},
                {"[System MS Node Name10]", "[SystemMSNodeName10]"},
                {"[Client GOC Id]", "[ClientGOCId]"},
                {"[Client Man Geo Tree Node]", "[ClientManGeoTreeNode]"},
                {"[Client MS Node Name3]", "[ClientMSNodeName3]"},
                {"[Client MS Node Name4]", "[ClientMSNodeName4]"},
                {"[Client MS Node Name5]", "[ClientMSNodeName5]"},
                {"[Client MS Node Name6]", "[ClientMSNodeName6]"},
                {"[Client MS Node Name7]", "[ClientMSNodeName7]"},
                {"[Client MS Node Name8]", "[ClientMSNodeName8]"},
                {"[Client MS Node Name9]", "[ClientMSNodeName9]"},
                {"[Client MS Node Name10]", "[ClientMSNodeName10]"},
                {"[Client Percentage]", "[ClientPercentage]"},
                {"[Min Hrs Per Week]", "[MinHrsPerWeek]"},
                {"[Timesheet Status]", "[TimesheetStatus]"},
                {"[Week Start]", "[WeekStart]"},
                {"[Week End]", "[WeekEnd]"},
                {"[Hours Booked]", "[TotalHours]"}
            };

        #endregion

        public const string QueryDeletePrevious = "DELETE FROM TimeBooking WHERE CONVERT(int, [Month]) IN ({0}) AND [Year] = {1}";

        public const string QueryExcel = @"SELECT 
                        [Year],
                        [Month Name],
                        [Month],
                        [Resource SOE],
                        [Resource Name],
                        [Resource Type],
                        [Res Manager Name],
                        [Project/Non-Project],
                        [Project Id],
                        [Project Manager],
                        [System GOC Code],
                        [System Man Geo Tree Node],
                        [System MS Node Name3],
                        [System MS Node Name4],
                        [System MS Node Name5],
                        [System MS Node Name6],
                        [System MS Node Name7],
                        [System MS Node Name8],
                        [System MS Node Name9],
                        [System MS Node Name10],
                        [Client GOC Id],
                        [Client MS Node Name3],
                        [Client MS Node Name4],
                        [Client MS Node Name5],
                        [Client MS Node Name6],
                        [Client MS Node Name7],
                        [Client MS Node Name8],
                        [Client MS Node Name9],
                        [Client MS Node Name10],
                        [Client Man Geo Tree Node],
                        [Client Percentage],
                        [Min Hrs Per Week],
                        [Timesheet Status],
                        [Week Start],
                        [Week End],
                        [Hours Booked]
                FROM [{0}]";
                //FROM [Report Detailed{0}$]";
        //[Program Id],
        ////                [Program Name],[Project Name],[Key Business Contact],
        //                [Technology Program Manager],
        //                [Tech Program Manager SMT],
        //                [Tech Program Manager STLT],
        //,
    }
}
